//
//  YTEtaiOrieButton.m
//  yitaicaijing
//
//  Created by DIANGHONG on 2018/8/15.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "YTEtaiOrieButton.h"

@implementation YTEtaiOrieButton

- (instancetype)init
{
    self = [super init];
    if (self) {


    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;//使图片和文字水平居中显示
    [self setTitleEdgeInsets:UIEdgeInsetsMake(self.imageView.frame.size.height+25 ,-self.imageView.frame.size.width, 0.0,0.0)];//文字距离上边框的距离增加imageView的高度，距离左边框减少imageView的宽度，距离下边框和右边框距离不变
    [self setImageEdgeInsets:UIEdgeInsetsMake(0.0, 0.0,0.0, -self.titleLabel.bounds.size.width)];//图片距离右边框距离减少图片的宽度，其它不边
}

@end
